package com.cxl.price.bean;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.summer.core.common.BeanName;
import com.summer.core.entity.BaseBean;

@Entity
@BeanName("产品")
public class Product extends BaseBean{
	
	private static final long serialVersionUID = 1L;

	//品牌
	private Brand brand;
	
	//类型
	private Ptype ptype;
	
	//型号
	private String model;


	@ManyToOne(cascade=CascadeType.REFRESH,fetch = FetchType.LAZY)
	@JoinColumn(name = "brand_id")
	public Brand getBrand() {
		return brand;
	}

	public void setBrand(Brand brand) {
		this.brand = brand;
	}

	@ManyToOne(cascade=CascadeType.REFRESH,fetch = FetchType.LAZY)
	@JoinColumn(name = "ptype_id")
	public Ptype getPtype() {
		return ptype;
	}

	public void setPtype(Ptype ptype) {
		this.ptype = ptype;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	
	
	

}
